package com.epam.Reptile;

public class Frog extends Reptile {

    public Frog (String name, int size, double price, int numberOfLimbs, boolean predator) {
        super(name, size, price, numberOfLimbs);

        this.predator = predator;
    }

    private boolean predator;

    public boolean isPredator() {
        return predator;
    }

    public void setPredator(boolean predator) {
        this.predator = predator;
    }

    @Override
    public void eat() {
        System.out.println("Frog eating");
        hunger--;
        System.out.println("Hunger: " + hunger);
    }

    @Override
    public void swim() {
        System.out.println("Frog swimming");
        hunger++;
        System.out.println("Hunger: " + hunger);
    }

    @Override
    public String toString() {
        return "Frog [ Name: "+getName()+"; Price: "+getPrice()+"; Size:"+ getSize()+
                "; Predator: "+isPredator()+"]";
    }


}
